package com.jzo2o.customer.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.AgencyCertification;
import com.jzo2o.customer.model.dto.AgencyCertificationUpdateDTO;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationResDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;

/**
 * <p>
 * 机构认证信息表 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-09-06
 */
public interface IAgencyCertificationService extends IService<AgencyCertification> {


    /**
     * 根据机构id更新
     *
     * @param agencyCertificationUpdateDTO 机构认证更新模型
     */
    void updateByServeProviderId(AgencyCertificationUpdateDTO agencyCertificationUpdateDTO);

    /**
     * 机构端提交认证申请
     * @param auditAddReqDTO
     * @return
     */
    AgencyCertification submitAuth(AgencyCertificationAuditAddReqDTO auditAddReqDTO);

    /**
     * 驳回原因
     *
     * @param certificationAuditReqDTO 认证审核请求模型
     */
    RejectReasonResDTO rejectReason(CertificationAuditReqDTO certificationAuditReqDTO);

    /**
     * 审核机构认证分页查询
     * @param agencyCertificationAuditPageQueryReqDTO
     * @return
     */
    PageResult<AgencyCertificationAuditResDTO> page(AgencyCertificationAuditPageQueryReqDTO agencyCertificationAuditPageQueryReqDTO);

    /**
     * 机构认证审核
     * @param id 机构认证id
     * @param certificationStatus 审核状态
     * @param rejectReason 拒绝原因
     */
    void audit(Long id, Integer certificationStatus, String rejectReason);
}
